#ifndef GLUIAPP_H
#define GLUIAPP_H

#include "stdafx.h"

#define MAX_SPINNER 10

class gluiApp
{
public:
	gluiApp(int , int);
	void createUI();
	void setidle(void (*f)(void));
	int getWindowID();
	void setWindowID(int );
	float* getRotationMatrix();
	float* getTranslationVector();
	
	int getHeight();
	int getWidth();

	//Add GUI
	void addSpinner(char*, float min, float max, float initval);
	void addSpinnerToPannel(char* , GLUI_Panel *, float limitMin, float limitMax, float initValue=0);
	void addCheckbox(char*);
	
	float getData(char*);
	int getDataInt(char*);
	float* getPointer2Data(char*);

	//FIXME
	void addIntValue(char*, int *val);
	void currentPanel(GLUI_Panel*);

	GLUI *glui;

protected:
	int _windowID;
	float view_rotate[16];
	float obj_pos[3];
	//parameters
	//spinner
	int _spinner_count;
	GLUI_Panel* raycaster_panel;
	GLUI_Spinner* _spinnerGUI[MAX_SPINNER];
	float _spinner[MAX_SPINNER];

	GLUI_Panel *currentP;

	int _height, _width;

protected:

	std::map<std::string, float> _parameter_float;
	std::map<std::string, int*> _parameter_int;

};

#endif